from functools import reduce
class Student:
def __init__(self, name, USN):
self.name = name
self.USN = USN
self.list = []
def getMarks(self) -> None:
print("Enter the marks of the student: ")
for i in range(0, 3):
self.list.append(int(input()))
def display(self):
max_marks = int(input("Enter max marks: "))
TotalMarks = reduce(lambda a, b: a + b, self.list)
percentage = (TotalMarks / max_marks) * 100
print("Name:", self.name)
print("USN", self.USN)
print("Marks: ", *self.list, sep="\n")
print("Max marks:", max_marks)
print("Obtained marks:", TotalMarks)
print("Percentage obtained:", percentage)
print("Enter the details of student 1")
name = input("Enter the name: ")
USN = input("Enter the USN: ")
s1 = Student(name, USN)
s1.getMarks()
print("\n")
s1.display()